package net.wangds.auth.role.repo.rdbms;

import net.wangds.auth.module.Role;
import net.wangds.auth.role.entity.GeneralRoleEntity;
import net.wangds.data.RemovedEnum;
import net.wangds.jpa.repository.RemovableRepo;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Optional;

@Repository
public interface RoleJpaRepo extends RemovableRepo<GeneralRoleEntity> {
    List<Role> findByIdIn(List<String> idlist);

    Page<Role> findByIdNotInAndRemoved(List<String> idlist, RemovedEnum normal1, Pageable pr);

    Optional<Role> findByRoleNameAndRemoved(String roleName, RemovedEnum removed);
    Optional<Role> findByRoleCodeAndRemoved(String roleCode, RemovedEnum removed);



}
